package com.baor.controller;

import com.baor.service.AddTrashService;
import com.baor.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping(value = "addTrash")
public class AddTrashController {

    @Autowired
    private AddTrashService addTrashService;

    // 添加垃圾清运工单接口，增加token验证（与系统其他接口保持一致）
    @RequestMapping(value = "add")
    public R addTrash(@RequestBody Map<String, Object> params) {
        return addTrashService.addTrash(params);
    }
    @RequestMapping(value = "price")
    public R Price(@RequestParam Map<String, Object> params) {
        return addTrashService.Unitprice(params);
    }

    @RequestMapping(value = "cabinet")
    public R Cabinet(Map<String, Object> params){
        return addTrashService.cabinetCode(params);
    }
}